<?php

namespace app\beautiful\model\setting;

use app\common\model\CommonModel;



class PartnerBonusSettingModel extends CommonModel{

    protected  $name = 'beautiful_partner_bonus_setting';

    protected  $pk   = 'bonus_setting_id';

    public static function onBeforeInsert($model)
    {
        $model->set("add_time", date('Y-m-d H:i:s'));
        $model->set("add_ip", request()->ip());
    }

    public static function onBeforeUpdate($model)
    {
        $model->set("update_time", date('Y-m-d H:i:s'));
    }
    public function dec($where, $field, $num)
    {
        return parent::n_dec($where, $field, $num); // TODO: Change the autogenerated stub
    }
    public function inc($where, $field, $num)
    {
        return parent::n_inc($where, $field, $num); // TODO: Change the autogenerated stub
    }
}

